package at.com.vn.chess.entity;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

import at.com.vn.chess.util.CommonMethod;

/**
 * @author nghilt
 * 2011/11/01
 */
@XmlRootElement
public class History implements Entity {
	private String processName;
	private int rId;
	private int tId;
	private List<H> listHistory;

	public History() {
		super();
		listHistory = new ArrayList<H>();
	}

	public History(int roomId, int tableId) {
		this.rId = roomId;
		this.tId = tableId;
		listHistory = new ArrayList<H>();
	}


	public List<H> getListHistory() {
		return listHistory;
	}

	public void setListHistory(List<H> listHistory) {
		this.listHistory = listHistory;
	}@Override
	public String getProcessName() {
		return processName;
	}

	@Override
	public void setProcessName(String processName) {
		this.processName = processName;
		
	}

	@Override
	public boolean isOwnTable(int room, int table) {		
		return rId == room && tId == table;
	}

	@Override
	public String getBoardsKey() {		
		return CommonMethod.createBoardKey(rId, tId);
	}

	public int getRId() {
		return rId;
	}

	public void setRId(int rId) {
		this.rId = rId;
	}

	public int getTId() {
		return tId;
	}

	public void setTId(int tId) {
		this.tId = tId;
	}
}
